"""
带参数的线程
"""
from time import sleep
from threading import Thread


def func(sec,name):
    print("带参数的线程来喽")
    sleep(sec)
    print("%s 线程执行完毕了"%name)

# 循环创建线程
for i in range(5):
    t = Thread(target=func,
               args=(2,),
               kwargs={"name":'T-%d'%i}) #分支线程
    t.start()